<script setup>

import DictSelect from "@/components/CommonSelect/DictSelect.vue";
import { Search } from '@element-plus/icons-vue'

defineProps({
  form: {
    type: Object,
    default: ()=>{
      return {}
    }
  }
})

const emit = defineEmits(['sub'])

function sub() {
  emit('sub');
}

</script>

<template>
  <el-form style="margin-bottom: 20px;">
    <dict-select v-model="form.state" dict-type="asset_state" style="width: 150px;margin-right: 20px;" placeholder="全部状态" @change="sub"></dict-select>

    <el-input
        v-model="form.value"
        style="max-width: 300px"
        placeholder="请输入"
    >
      <template #prepend>
        <el-select v-model="form.field" placeholder="请选择" style="width: 80px">
          <el-option label="编码" value="number" />
          <el-option label="名称" value="name" />
        </el-select>
      </template>
      <template #append>
        <el-button :icon="Search" @click="sub" />
      </template>
    </el-input>


  </el-form>
</template>

<style scoped lang="scss">

</style>